/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package CA;

import org.apache.xmlrpc.XmlRpcException;
import org.apache.xmlrpc.XmlRpcRequest;
import org.apache.xmlrpc.server.RequestProcessorFactoryFactory;

/**
 *
 * @author Diego e Alessandro
 * 

*/

public class EchoRequestProcessorFactoryCA implements
      RequestProcessorFactoryFactory {
   
    private final RequestProcessorFactory factory =
      new EchoRequestProcessorFactory();
    
    private final Ca echo;

    public EchoRequestProcessorFactoryCA(Ca echo) {
      this.echo = echo;
    }

    public RequestProcessorFactory getRequestProcessorFactory(Class aClass)
         throws XmlRpcException {
      return factory;
    }

    private class EchoRequestProcessorFactory implements RequestProcessorFactory {
      public Object getRequestProcessor(XmlRpcRequest xmlRpcRequest)
          throws XmlRpcException {
        return echo;
      }
    }
  }
